package kk;

import java.util.ArrayList;
import java.util.List;

public class Page<T> {
	private int pageNo;
	public static final int PAGESIZE = 20;
	private int totalpages;
	private int totalLines;
	private List<T> datas = new ArrayList<T>();

	public int getPageNo() {
		return pageNo;
	}

	public void setPageNo(int pageNo) {
		this.pageNo = pageNo;
	}

	public int getTotalpages() {
		return totalpages;
	}

	public void setTotalpage(int totalpage) {
		this.totalpages = totalpage;
	}

	public int getTotalLines() {
		return totalLines;
	}

	public void setTotalLines(int totalLines) {
		this.totalLines = totalLines;
		this.totalpages = totalLines % PAGESIZE == 0 ? totalLines / PAGESIZE
				: totalLines / PAGESIZE + 1;
	}

	public List<T> getDatas() {
		return datas;
	}

	public void setDatas(List<T> datas) {
		this.datas = datas;
	}

	public static int getPagesize() {
		return PAGESIZE;
	}

}
